package com.ease.platform.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;

public enum PermissionDimensionMetaType implements OptionalEnum {

	DefaultDimension((short) 1, "默认维度"), // eg Menu,ToolBarButton,Action
	LocationDimension((short) 2, "区域维度"), //
	NetworkSpecialtyDimension((short) 3, "专业维度"),

	MenuDimension((short) 4, "主菜单"), //
	ButtonDimension((short) 5, "按钮"), //
	RightClickMenuDimension((short) 6, "右键菜单"), //
	ExplorerDimension((short) 7, "文件夹"), //
	PerspectiveViewDimension((short) 8, "透视图"), AttributeTypeDimension((short) 9, "实体属性维度");

	private short value;

	private String text;

	private PermissionDimensionMetaType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public final static PermissionDimensionMetaType get(short value) {
		return EnumUtil.get(PermissionDimensionMetaType.class, value);
	}

	public final static PermissionDimensionMetaType get(String name) {
		return EnumUtil.get(PermissionDimensionMetaType.class, name);
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name();
	}

	/**
	 * @return the value
	 */
	public short getValue() {
		return value;
	}

}
